package com.hfzy.ihk.web.freeswitchCall.support.rmi;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * 将数据推送到Es 保存工具类
 */
public class EsRmiUtils {

    public static RejectedExecutionHandler handler = new ThreadPoolExecutor.CallerRunsPolicy(); //线程池策略如果队列满了就用当前线程去执行

    public static ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(16, 16, 3, TimeUnit.SECONDS,new LinkedBlockingQueue<Runnable>(100),handler);



}
